<include file="Public:header" />
<div style="boder:1px solid #ccc;margin:10px 10px 0px 10px;">
    <div style="border:1px solid #ccc;height:40px;padding:0 0 0 20px;line-height:40px;">
           站内链接管理
    </div>
    
    <div style="border:1px solid #ccc;height:auto;padding:5px 18px 5px 11px;margin-top:5px;"> 
    <table width="100%">
           <tr>
               <td colspan="6">
               <table cellpadding="0" cellspacing="0">
                   <tr>
                       <td>
                           <input type="button" style="margin:0px 4px 0px 0px;" id="addLink" name="add" value="添加链接" />
                       </td>
                       <td>
           <form action="" method="">
                            <input type="button" id="editLink" name="edit" value="编辑链接" />
                            <input type="button" id="delLink" name="del" value="删除链接" />
                        </td>
                   </tr>
                </table>
                </td>
           </tr>
           <tr>
                <th width="80" style="border:1px solid #ccc">[ID]</th>
                <th style="border:1px solid #ccc">链接名称</th>
                <th style="border:1px solid #ccc">连接地址</th>
                <th width="100" style="border:1px solid #ccc">连接图片</th>
                <th width="140" style="border:1px solid #ccc">创建时间</th>
                <th width="65" style="border:1px solid #ccc">操作</th>
           </tr>
           <foreach name="websiteLink" item="val">
           <tr>
                <td>
                    <input type="checkbox" name="id[]" value="{$val.id}" />&nbsp;{$val.id}
                </td>
                <td>
                    {$val.link_name}
                </td>
                <td>
                    {$val.link_url}
                </td>
                <td>
                    <if condition="$val.link_image neq ''">
                    <img src="__ROOT__/Data/Admin/Uploads/{$val.link_image}" width="100"></img>
                    <else/>
                    NO IMAGE!
                    </if>
                </td>
                <td>
                    2012-02-03 04:04:06
                </td>
                <td>
                    <a href="">编辑</a>&nbsp;&nbsp;<a href="">删除</a>
                </td>
            </tr>
            </foreach>
            </form>
            <tr>
                <td colspan="6">
                    {$page}
                </td>
            </tr>
    </table>
    </div>
</div>
  </body>
  <script type="text/javascript">
      jq("#addLink").click(function(){
             location.href="{:U('WebsiteLink/addWebsiteLink')}";        
      });
      
  </script>
  </html>
